/**
 * 弹出标签选择窗口
 * @param opts: 窗口参数：[value:标签值(Map类型)，text:显示文本(类型)，backFn:回调函数]
 */
product.category.edit.popTagSelect = function (opts) {
    $.loadScript.load($.ctx + '/platformjs/product/tag/popup.js').done(function () {
        liandisys.dialog.showWindowById({
            itemId: 'selectTagPopup',
            href: $.ctx + '/product/tag/popup',
            resizable: false,
            title: '商品标签选择',
            width: 680,
            height: 'auto',
            onLoad: function () {
                product.tag.popup.init(opts);
            }
        });
    });
};

/**
 * 弹出分类选择窗口
 *
 * 使用例子:
 * <pre>
 *     product.category.edit.popCategroySelect({
 *          checkedIds : [2001164, 2001165],
 *          selectMode : 'leaf',
 *          backFn : function(ids, nodes) {
 *              //此处可对返回后数据做具体操作
 *              console.log(ids);
 *              console.log(nodes);
 *          }
 *     });
 * </pre>
 * 输出结果:弹出窗口，后点击【选择】,打印：[2001164, 2001165]， [Object { productCategoryId=2001164,  productCategoryName="1、散步",  xpath="0/2001056/2001058/2001059/2001060/2001163"}, Object { productCategoryId=2001165,  productCategoryName="2、秋天的怀念",  xpath="0/2001056/2001058/2001059/2001060/2001163"}]
 *
 * @param opts: 窗口参数：[checkedIds: 选中IDS, selectMode: 选择模式(leaf:只选择子节点;parent:只选择尽量最高层的父节点(默认)), backFn(ids, nodes) 选择后的回调函数]
 *
 */
product.category.edit.popCategroySelect = function (opts) {
    $.loadScript.load($.ctx + '/platformjs/product/category/popup.js').done(function () {
        liandisys.dialog.showWindowById({
            itemId: 'selectCategoryPopup',
            href: $.ctx + '/product/category/popup',
            resizable: false,
            title: '商品分类选择',
            width: 480,
            height: 'auto',
            onLoad: function () {
                product.category.popup.init(opts);
            }
        });
    });
};